import ezAuth from "@/assets/js/ez-auth";

export default {
    data() {
        return {
            auth_add: ezAuth.reg("+mes.CheckProcess.add", "检验工序_新增"),//新增
            auth_copy: ezAuth.reg("+mes.CheckProcess.copy", "检验工序_复制"),//复制
            auth_edit: ezAuth.reg("+mes.CheckProcess.edit", "检验工序_编辑"),//编辑
            auth_del: ezAuth.reg("-mes.CheckProcess.del", "检验工序_删除"),//删除
            auth_view: ezAuth.reg("+mes.CheckProcess.view", "检验工序_查看"),//查看
        }
    },
    directives: {
        auth: {
            bind: ($el, binding, vnode, prevVnode) => {
                ezAuth.checkAllow(binding.value) ? $el.style.display = "normal" : $el.style.display = "none"
            }
        }
    }
}